<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="/css/bootstrap.css">
    <title>注册页面</title>
</head>
<body>

    <%
        String status = (String)request.getAttribute("status");
        if(status != null) {
            if(status.equals("error")) {
    %>
            <script type="text/javascript">alert("注册失败！");</script>
    <%
            } else if(status.equals("isExist")) {
    %>
            <script type="text/javascript">alert("该用户名已存在！");</script>
    <%
            }
        }
    %>

    <form method="post" action="/RegisterServlet">
        <div class="form-group">
            <label for="InputUsername">用户名：</label>
            <input type="text" name="uname" class="form-control" id="InputUsername" placeholder="Enter Username">
        </div>
        <div class="form-group">
            <label for="InputPassword">密码：</label>
            <input type="password" name="upwd" class="form-control" id="InputPassword" placeholder="Enter Password">
        </div>
        <button type="submit" value="注册" class="btn btn-primary">注册</button>
    </form>
</body>
</html>
